var $_this_clicked;
$(function(){
    $("#db-list li").click(function(){
    	$_this_clicked = $(this);
    	var indx = $_this_clicked.index();
    	var name = $_this_clicked.text();
    	var string = "ajax=&col=" + name;
    	jk_send_request_get("GetCollections.html", string, responseResult);
    });
});

function responseResult (data, textStatus) {
	var result = dealSuccess(data, textStatus);
    if (result != true && result != false) {
    	$_this_clicked.siblings('ul').remove();
    	var len = result.length;
    	var i = 0;
    	var string = "<ul>";
    	for (i = 0; i < len; i++) {
            string += "<li>" + result[i].Name + "</li>";
    	}
    	string += "</ul>"
        $_this_clicked.after(string);
    }
}
